﻿<phone:PhoneApplicationPage 
    x:Class="Cnblogs.NewsBodyPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="696" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True">
    
    <phone:PhoneApplicationPage.Resources>
        <Storyboard x:Name="Fadeout">
            <DoubleAnimation Duration="0:0:0.05" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="LayoutRoot" d:IsOptimized="True"/>
        </Storyboard>
        <Storyboard x:Name="Fadein">
            <DoubleAnimation Duration="0:0:0.6" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="LayoutRoot" d:IsOptimized="True"/>
        </Storyboard>

    </phone:PhoneApplicationPage.Resources>

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot">
        <toolkit:GestureService.GestureListener>
            <toolkit:GestureListener Flick="GestureListener_Flick" />
        </toolkit:GestureService.GestureListener>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="auto"/>
            <RowDefinition/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <TextBlock Grid.Row="0" Margin="12,0,12,0" x:Name="tbk_title" Width="454" TextWrapping="Wrap" FontSize="28"/>
        <Grid Grid.Row="1" Margin="12,0,12,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" x:Name="tbk_source" FontSize="24" VerticalAlignment="Center" />
            <Button Style="{StaticResource btn_Common}" Grid.Column="1" Click="btn_comment_Click">
                <StackPanel Orientation="Horizontal">
                    <Image x:Name="img_comments" Source="/Images/comments.png" Height="48" Width="48" />
                    <TextBlock x:Name="tbk_comments" FontSize="22" FontWeight="Bold" VerticalAlignment="Center"  Margin="-2,0,12,0"/>
                </StackPanel>
            </Button>
        </Grid>
        <phone:WebBrowser Grid.Row="2" x:Name="webBrowser"
                          Background="Transparent"
                          IsScriptEnabled="True"
                          ScriptNotify="webBrowser_ScriptNotify">
            <phone:WebBrowser.Resources>
                <Storyboard x:Name="WebBrowserFadeIn" BeginTime="0:0:0.0">
                    <DoubleAnimation
                                Storyboard.TargetName="webBrowser" Storyboard.TargetProperty="Opacity"
                                From="0.0" To="1.0" Duration="0:0:0.2"/>
                </Storyboard>
            </phone:WebBrowser.Resources>
        </phone:WebBrowser>
    </Grid>
 
    <!--Sample code showing usage of ApplicationBar-->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_ie.png" Text="查看原文" Click="Appbar_IE_Click"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_weibo.png" Text="分享微博" Click="Appbar_Weibo_Click"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="短信分享" Click="Menu_SMS_Click"/>
                <shell:ApplicationBarMenuItem Text="邮件分享" Click="Menu_Email_Click"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>
